import Vue from 'vue'
import App from './App.vue'
import router from './router/router'
import store from './store/store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import './components/dialog'
// import debug from './components/debug';
Vue.prototype.$axios = axios // 可以使用this.$axios了
axios.defaults.headers.common['Cache-Control'] = 'no-cache' // IE配置此项无效
Vue.use(ElementUI, { size: 'small' })

// Vue.use(debug, { entryName: 'webmall' })
Vue.config.productionTip = false
// 生产环境请勿使用mockXHR
import mockXHR from '../mock'
mockXHR()
import permission from '@/directives/permission'

Vue.directive('permission', permission)

import Banner from '@/components/banner'
Vue.use(Banner)

import { Anchor, Affix } from 'ant-design-vue'
Vue.use(Anchor)
Vue.use(Affix)

// 注册全局过滤器
import { urgencyLevelFormatter } from '@/filters/filters'
Vue.filter('urgencyLevelFormatter', urgencyLevelFormatter)

import dataV from '@jiaminghi/data-view'
Vue.use(dataV)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
